package com.lk.lkappearance.service.impl;

import com.lk.lkappearance.common.AbstractBaseService;
import com.lk.lkappearance.mapper.ClicksMapper;
import com.lk.lkappearance.model.Clicks;
import com.lk.lkappearance.service.ClicksService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class ClicksServiceImpl extends AbstractBaseService implements ClicksService {


    @Autowired
    private ClicksMapper clicksMapper;

    /**
     *
     * @param clicks
     * @return
     */
    @Override
    public Map<String, Object> getList(Clicks clicks) {
        Map<String, Object> result = new HashMap<>();
        try {
            List<Clicks> list = clicksMapper.getList(clicks);
            result.put("list",list);
        }catch (Exception e) {
            e.printStackTrace();
        }
        return success().setData(result).getResult();
    }
}
